<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	
   <h:form>	
    <h:outputText value="View RRF(s)" styleClass="outputTextTitle"/>		
		 <p:panel header="View RRFs">   
            
	             <p:dataTable id="viewrrfs" value="#{viewSavedRRFsBean.recruitmentRequestList}" var="viewrrf" >  
	  
		            <p:column headerText="RRF Code"> 
		                <h:outputText value="#{viewrrf.recruitmentRequestCode}" />
		            </p:column> 	            
		            
		            <p:column headerText="Request Date">
		                <h:outputText value="#{viewrrf.requestDate}">
		                	<f:convertDateTime pattern="dd-MMM-yyyy HH:mm a"/>  
		                </h:outputText>
		            </p:column>  
		            
		            <p:column headerText="Tehnology">
		                <h:outputText value="#{viewrrf.technology.displayName}"/>
		            </p:column> 
		             
		            <p:column headerText="Years of Exp">  
		                <h:outputText value="#{viewrrf.relaventExperienceFrom} - #{viewrrf.relaventExperienceTo}" />  
		            </p:column>  
		            
		            <p:column headerText="Priority">  
		                <h:outputText value="#{viewrrf.recruitmentPriority}" />  
		            </p:column>  
		            
		            <p:column headerText="Request Status">  
		                <h:outputText value="#{viewrrf.formSaveOrSubmit}" />  
		            </p:column> 
		        
		            <p:column headerText="View RRF" > 
		                <p:commandButton action="#{viewSavedRRFsBean.viewRRFAction}" value="VIEW" disabled="#{viewrrf.formSaveOrSubmit eq 'Saved'}">			
							<f:param id="employeeId" name="employeeId" value="#{viewRRFsListBean.wamUser.employee.employeeCode}" />
							<f:param id="rrfCode" name="rrfCode" value="#{viewrrf.recruitmentRequestCode}" />
							<f:param id="recruiterCode" name="recruiterCode" value="#{viewrrf.recruiter.employeeCode}" />
						</p:commandButton>
		            </p:column>
		            
		             <p:column headerText="Submit Now" > 
		                <p:commandButton action="#{viewSavedRRFsBean.submitRRFAction}" value="Submit Now" disabled="#{viewrrf.formSaveOrSubmit eq 'Submitted'}">							
							<f:param  name="rrfCode" value="#{viewrrf.recruitmentRequestCode}" />
						</p:commandButton>
		            </p:column>
		          
	            </p:dataTable>  	            
         </p:panel>
		</h:form>
	</ui:define>
</ui:composition>